﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Sisocana.Core.Models;

namespace Sisocana.Services
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IMobileServices" in both code and config file together.
    [ServiceContract]
    public interface IMobileServices
    {
        [OperationContract]
        List<LightCatastrophe> GetCatastrophes();

        [OperationContract]
        bool SendHelpRequest(HelpRequest message);
    }

    [DataContract]
    public class LightCatastrophe
    {
        [DataMember(IsRequired = true)]
        public int catastropheId;
        [DataMember(IsRequired = true)]
        public string catastropheName;

        public LightCatastrophe(int siteId, string siteName) { catastropheId = siteId; catastropheName = siteName; }
        public LightCatastrophe() { }
    }

    [DataContract]
    public class HelpRequest
    {
        [DataMember(IsRequired = true)]
        public int catastropheId;
        [DataMember(IsRequired = true)]
        public string firstName;
        [DataMember(IsRequired = true)]
        public string lastName;
        [DataMember(IsRequired = true)]
        public string situationDescription;
        [DataMember(IsRequired = true)]        
        public string latitude;
        [DataMember(IsRequired = true)]
        public string longitude;
        [DataMember(IsRequired = true)]
        public DataImagen image;
    }
}
